from selenium import webdriver
from pprint import pprint

class TextCase:
    def __init__(self):
        self.driver = webdriver.Chrome()
        self.driver.get('https://baidu.com')

    def elements_by_tag_name(self):
        input_list = self.driver.find_elements_by_tag_name('input')
        pprint(input_list)
        print(len(input_list))

    def element_by_tag_name(self):
        input_web_element = self.driver.find_element_by_tag_name('input')
        print(input_web_element.get_attribute('outerHTML'))


    def quit(self):
        self.driver.quit()


case = TextCase()
case.element_by_tag_name()
case.quit()
